package com.cybertron.am.wordpress;

import com.cybertron.am.wordpress.persistence.CrawlSeedMapper;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableConfigurationProperties(AWProperties.class)
@EnableScheduling
@EnableSwagger2
@EnableAsync
@EnableTransactionManagement
@Slf4j
@MapperScan(basePackageClasses = {CrawlSeedMapper.class})
public class Application {

    public static void main(String[] args) {
        new SpringApplicationBuilder(Application.class).run(args);
        log.info("AM Wordpress Started");
    }
}
